<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.ico">
    <title>Preclinic - Medical & Hospital - Bootstrap 4 Admin Template</title>
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/select2.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <!--[if lt IE 9]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
	<![endif]-->
</head>

<body>
            <div class="content">
                <div class="row">
                    <div class="col-sm-4 col-5">
                        <h4 class="page-title">员工工资</h4>
                    </div>
                    <div class="col-sm-8 col-7 text-right m-b-30">
                        <a href="add-salary.html" class="btn btn-primary btn-rounded float-right"><i class="fa fa-plus"></i> 新增</a>
                    </div>
                </div>
                <div class="row filter-row">
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <div class="form-group form-focus">
                            <label class="focus-label">员工</label>
                            <input type="text" class="form-control floating">
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <div class="form-group form-focus select-focus">
                            <label class="focus-label">角色</label>
                            <input type="text" class="form-control floating">
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <div class="form-group form-focus select-focus">
                            <label class="focus-label">请假状态</label>
                            <select class="select floating">
                                <option> -- Select -- </option>
                                <option value="等待"> 等待 </option>
                                <option value="同意"> 同意 </option>
                                <option value="拒绝"> 拒绝 </option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <div class="form-group form-focus">
                            <label class="focus-label">从</label>
                            <div class="cal-icon">
                                <input class="form-control floating datetimepicker" type="text">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <div class="form-group form-focus">
                            <label class="focus-label">到</label>
                            <div class="cal-icon">
                                <input class="form-control floating datetimepicker" type="text">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-lg-3 col-xl-2 col-12">
                        <a href="#" class="btn btn-success btn-block"> 查询 </a>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="table-responsive">
                            <table class="table table-striped custom-table datatable">
                                <thead>
                                    <tr>
                                        <th style="width:25%;">员工姓名</th>
                                        <th>员工编号</th>
                                        <th>Email</th>
                                        <th>入职日期</th>
                                        <th>角色</th>
										<th>基本工资</th>
                                        <th>实发工资</th>
                                        <th>工资单</th>
                                        <th class="text-right">操作</th>
                                    </tr>
                                </thead>
                                <tbody id="salarys">
                                    
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            
		<div id="delete_salary" class="modal fade delete-modal" role="dialog">
			<div class="modal-dialog modal-dialog-centered">
				<div class="modal-content">
					<div class="modal-body text-center">
						<h3>Are you sure want to delete this Salary?</h3>
						<div class="m-t-20"> <a href="#" class="btn btn-white" data-dismiss="modal">Close</a>
							<button type="submit" class="btn btn-danger">Delete</button>
						</div>
					</div>
				</div>
			</div>
		</div>
    <div class="sidebar-overlay" data-reff=""></div>
    <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script src="assets/js/jquery-3.2.1.min.js"></script>
	<script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/dataTables.bootstrap4.min.js"></script>
    <script src="assets/js/jquery.slimscroll.js"></script>
    <script src="assets/js/select2.min.js"></script>
    <script src="assets/js/moment.min.js"></script>
    <script src="assets/js/bootstrap-datetimepicker.min.js"></script>
    <script src="assets/js/app.js"></script>
	<!--json data-->
	<script type="text/javascript" src="json/salarys.json"></script>
	<script type="text/javascript">
	$(document).ready(function () {	
		var salarysStr = "";
		for(var i = 0; i < salarys.length; i++){
			salarysStr = salarysStr + '<tr><td>';
			salarysStr = salarysStr + '<img class="rounded-circle" src="assets/img/user.jpg" height="28" width="28" alt="">'+ salarys[i].employeeName +'</td>';
            salarysStr = salarysStr + '<td>'+ salarys[i].employeeId +'</td>';
            salarysStr = salarysStr + '<td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="">'+ salarys[i].employeeEmail +'</a></td>';
            salarysStr = salarysStr + '<td>'+ salarys[i].employeeJoin +'</td>';
            salarysStr = salarysStr + '<td>'+ salarys[i].employeeRole +'</td>';
			salarysStr = salarysStr + '<td>￥'+ salarys[i].base +'</td>';
            salarysStr = salarysStr + '<td>￥'+ salarys[i].actual +'</td>';
            salarysStr = salarysStr + '<td><a class="btn btn-sm btn-primary" href="salary-view.html">查看</a></td>';
            salarysStr = salarysStr + '<td class="text-right">';
            salarysStr = salarysStr + '<div class="dropdown dropdown-action">';
            salarysStr = salarysStr + '<a href="#" class="action-icon dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-ellipsis-v"></i></a>';
            salarysStr = salarysStr + '<div class="dropdown-menu dropdown-menu-right">';
            salarysStr = salarysStr + '<a class="dropdown-item" href="edit-salary.html"><i class="fa fa-pencil m-r-5"></i> 编辑</a>';
            salarysStr = salarysStr + '<a class="dropdown-item" href="#" data-toggle="modal" data-target="#delete_salary"><i class="fa fa-trash-o m-r-5"></i> 删除</a>';
            salarysStr = salarysStr + '</div></div></td></tr>';
		}
		$("#salarys").html(salarysStr);
	});
	</script>
</body>

</html>